package com.ruoyi.project.cms.pro.service;

import com.ruoyi.common.constant.ScheduleConstants;
import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.monitor.job.domain.Job;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.ruoyi.project.cms.pro.domain.ProFile;
import com.ruoyi.project.cms.pro.mapper.ProFileMapper;

import java.util.List;

/**
 *com.ruoyi.project.cms.pro.service
 *作者：lh
 描述:
 *时间:2020-05-20
 */
@Service
public class ProFileServiceImpl implements ProFileService{

    @Resource
    private ProFileMapper proFileMapper;

    @Override
    public int deleteByPrimaryKey(Integer proId) {
        return proFileMapper.deleteByPrimaryKey(proId);
    }

    @Override
    public int insert(ProFile record) {
        return proFileMapper.insert(record);
    }

    @Override
    public ProFile selectByPrimaryKey(Integer proId) {
        return proFileMapper.selectByPrimaryKey(proId);
    }

    @Override
    public int updateByPrimaryKey(ProFile record) {
        return proFileMapper.updateByPrimaryKey(record);
    }

    @Override
    public int deleteByIds(String ids) {
        Integer[] nid = Convert.toIntArray(ids);
        for (int n:nid){
            proFileMapper.deleteByPrimaryKey(n);
        }
        return 1;
    }


    @Override
    public List<ProFile> selectByBench3(ProFile proFile){
        return proFileMapper.selectAll3();
    }

    @Override
    public List<ProFile> selectByBench1(ProFile proFile) {
        return proFileMapper.selectAll1();
    }

    @Override
    public List<ProFile> selectByBench2(ProFile proFile) {
        return proFileMapper.selectAll2();
    }

    @Override
    public String checkFileNameUnique(ProFile file) {
        return proFileMapper.checkFileNameUnique(file);
    }


}
